1. Field of the Invention
The present invention relates to an image processing apparatus and method, and in particular, to an image processing method for analyzing an image, calculating image processing conditions based on the results of analysis, and processing the image in accordance with the processing conditions calculated, and to an image processing apparatus to which the image processing method is applicable.
2. Description of the Related Art
A conventional image processing system is known in which a film image recorded on a photographic film is read by a film reading device including a read sensor such as a CCD sensor, and the image data obtained by reading is subjected to various types of image processing, and based on the image data thus processed, the image is recorded onto a recording material. In this image processing system, as compared with a conventional photographic processing system for recording a film image onto a photographic paper by planar exposure, the quality of the recorded image can be freely controlled by processing the image data. For example, if a film image photographed by using a flash or a film image which is a photographed backlit scene is subjected to a so-called hyper gradation process for compressing the gradation of the low-frequency components of the image, a recorded image free of a loss in gradation detail in shade area and highlight area in the background regions can be obtained without making the whole image soft gradation.
The contents of film images are varied, and the image processing conditions for image processing (the density conversion conditions for the density conversion process, the gradation compression conditions for the hyper gradation process, etc.) for producing a recorded image of a proper quality vary from one film image to another. In the image processing system described above, therefore, auto setup calculation is carried out for each film image unit. In auto setup calculation, the film image is read preliminarily (prescanned) with a comparatively low resolution, and then the film image is officially read with a high resolution (fine scanned). The film image is analyzed based on the image data obtained by the prescan, and the processing conditions for various image processings are calculated for producing a recorded image with a proper quality. The image data obtained by the fine scan is processed in various ways in accordance with the processing conditions calculated in the auto setup calculation.
With the algorithm for the auto setup calculation described above, proper processing conditions can be obtained for a great majority of film images. Nevertheless, the percentage of obtaining proper processing conditions has not yet reached 100%, and there are cases in which proper processing conditions cannot be obtained depending on the contents of the film image.
For this reason, a recorded image obtained by image processing according to the parameters calculated by the auto setup calculation is estimated based on prescanned image data and displayed as a simulation image. An operator verifies the quality of the simulation image, i.e., determines whether the processing conditions calculated by the auto setup calculation are proper or not. In the case where the operator determines that the quality of the simulation image is not proper (i.e., in the case where the operator determines that the auto setup calculation has ended in failure), the operator directly adjusts the processing conditions for a specific image processing.
In the image processing system described above, in order to produce recorded images with proper quality from film images having various contents, various image processings are available for controlling the quality of the recorded image. However, in the case where the auto setup calculation ends in failure, the operator often finds it difficult to determine which processing conditions of image processings should be adjusted. Also, complicated image processings such as the hyper gradation process require, for the operator, considerable knowledge and experience to determine how to adjust the processing conditions. Thus, the operator has hitherto adjusted the processing conditions for various image processings by trial and error. Therefore, in the case where the auto setup calculation has failed, a great burden is imposed on the operator, and there is also the problem that the processing speed of the image processing system is slow.
The object of the present invention, which has been developed in view of the facts described above, is to provide an image processing apparatus and method in which proper image processing conditions can be obtained by simple operation even in cases in which it is difficult to obtain proper image processing conditions automatically.
In order to achieve the above-mentioned object, according to a first aspect of the invention, there is provided an image processing apparatus comprising calculating means for analyzing an image and for, based on the results of analysis, calculating processing conditions for plural types of image processings for image data representing the analyzed image, image processing means for performing each of the plural types image processings on inputted input image data in accordance with the processing conditions calculated by the calculating means, and input means for inputting information designating a change in the processing conditions of a specific image processing among the processing conditions calculated by the calculating means, wherein in a case in which the information designating a change in the processing conditions of a specific image processing scheme is input to said calculating means through said input means, said calculating means changes the processing conditions for the specific image processing, analyzes the image again in such a manner as to reflect said designation to change the processing conditions, and recalculates the processing conditions for at least one image processing other than the specific image processing on the basis if the results of analysis.
The calculating means in the first aspect of the invention analyzes the image and calculates the processing conditions for a plurality of image processing for the image data representing the analyzed image based on the results of analysis. The image can be analyzed and the processing conditions can be calculated specifically by determining the average density or other various image feature amounts using the image data representing the image to be processed, for example, and in accordance with the image feature amounts thus determined. In this way, proper processing conditions for a plurality of image processing can be obtained automatically in accordance with the contents of the image data for a great majority of images. The image processing means also carries out a plurality of image processing on the image data input thereto in accordance with the processing conditions calculated by the calculating means. The image data on which a plurality of image processing are performed by the image processing means may be either the same image data as those used by the calculating means for image analysis or the image data of higher resolution. As described above, by performing a plurality of image processings in accordance with the processing conditions calculated by the calculating means, the image data for a great majority of images can be processed by a plurality of image processings under various proper processing conditions.
The existing algorithm for calculating the processing conditions for image processing cannot achieve 100% performance of the proper processing conditions. Depending on the contents of the image to be processed, therefore, the density or color tint of the important part area of the image represented by the image data after image processing may not be proper, or otherwise proper processing conditions may not be obtained. In view of this, the first aspect of the invention comprises input means for inputting information designating a change in the processing conditions for a specific image processing among the processing conditions calculated by the calculating means. In the case where information designating a change in the processing conditions for a specific image processing is input to the calculating means through the input means, the calculating means changes the processing conditions for the specific image processing, analyzes the image again in such a manner as to reflect the designation of the change in the processing conditions, and recalculates the processing conditions for at least one image processing other than the specific image processing based on the results of the reanalysis.
As a result, if the operator determines that the processing conditions calculated by the calculating means are not proper and inputs through the input means information designating a change in the processing conditions of the specific image processing, the image is analyzed again in such a manner as to reflect the designation of the change in the processing conditions. The processing conditions for at least one image processing other than the specific image processing are converted into proper processing conditions by the recalculation in the calculating means in such a manner as to reflect the designation for a change in the processing conditions of the specific image processing. Also, direct adjustment by the operator of the processing conditions recalculated is not required to attain the proper quality of the image represented by the image data after image processing.
According to the first aspect of the invention, therefore, proper image processing conditions, which may be difficult to automatically attain, can be realized by the simple operation of inputting information designating a change in a specific parameter.
The specific image processing described above preferably is one in which the quality of the important part area of the image can be controlled by changing the processing conditions and the operator can readily determine the extent to which the processing conditions are to be changed, e.g., the density conversion process according to the third aspect of the invention in which the density (which may be either the average density of the component colors (R, G, B, for example) or the density of each component color) of the image represented by the image data is converted in accordance with the density conversion conditions.
If the density conversion conditions are changed, the density or the color balance is changed over the entire image including the important part area thereof. Therefore, on the basis of, for example, the image quality (density, color tint, etc.) of the important part area (such as the area corresponding to a human face in the image), of the image, the operator can easily determine the manner in which the density conversion conditions are to be changed to attain a proper image quality of the important part area. Thus, by using density conversion processing as the specific image processing, the burden on the operator during input of information designating a change in processing conditions can be reduced even more.
Also, the image processing which can be used for recalculating the processing conditions may be, for example, an image processing in which the proper processing conditions for a specific image processing vary in accordance with the results of image analysis. When the density conversion conditions are changed in the density conversion processing described above, for example, the image density range also changes. The proper processing conditions (the gradation compression conditions in this case) also change for hyper gradation processing in which the gradation of the low-frequency component of the image is compressed in order to maintain the image density within a predetermined range. In the case where the density conversion processing is used as the specific image processing, for example, hyper gradation processing can be used as the image processing for recalculating the processing conditions as in the third aspect of the invention.
The verification work by the operator to determine whether the processing conditions calculated by the calculating means are proper or not or to determine the extent to which the processing conditions for a specific image processing are to be changed may be accomplished, for example, by recording the image on a recording material using the image data processed by the image processing means, and the operator referring to the recorded image. However, in such a case, the amount of recording material used is increased and a considerable time is taken before finishing the image recorded on the recording material, thereby resulting in a considerable increase in the processing time. In view of this, according to the second aspect of the invention, an image display means is added to the first aspect of the invention, and a display control means is used to carry out the plural types of image processings on the image data in accordance with the processing conditions calculated by the calculating means. The image represented by the processed image data is displayed on the display means.
The image data processed by the display control means may be either the same image data as the one on which the plural types of image processings are performed by the image processing means, or may be image data representing the same image with a lower resolution. According to the second aspect of the invention, the operator is not required to wait until the image recorded in the recording material is finished, and the verification work described above can be carried out by the operator referring to the image displayed on the display means. Thus, the processing time can be shortened. Also, increased consumption of recording material is suppressed.
The display control means may be structured such that in the case where information designating a change in the processing conditions for a specific image processing is input, a plurality of image processings are carried out in accordance with the various processing conditions including those changed or recalculated by the calculating means, and the image is redisplayed on the display means. As a result, the operator can easily determine by referring to the image redisplayed on the display means whether the input change designation is proper or not, and also whether the image processing corresponding to the recalculated processing conditions has been changed to proper processing conditions or not.
According to a third aspect of the invention, in the image processing apparatus of the first aspect, the plural types of image processings include density conversion processing for converting the density of the image represented by the image data in accordance with density conversion conditions, and hyper gradation processing for compressing the gradation of low-frequency components of the image in accordance with gradation compression conditions, and wherein in a case in which information, which designates a change in said density conversion conditions in such a manner that the density of the image represented by the image data which has been subjected to the density conversion processing changes by a predetermined amount, is input to said calculating means through said input means, said calculating means changes the density by a predetermined amount for the image data representing the image to be processed, reanalyzes the image to be processed, and recalculates the gradation compression conditions for hyper gradation processing based on the results of analysis.
For example, in an image obtained by photographing a backlit scene, the important part area thereof generally has improper image quality in that it is low in brightness (high density). In the case where the proper processing conditions cannot be obtained by the operation of the calculating means, the image quality of the important part area may often fail to be improved even after the image is subjected to various image processings such as the hyper gradation processing in accordance with the calculated processing conditions. If the density conversion processing is used as the specific image processing and the density conversion conditions can be changed through the input means, as long as information is input designating the change in the density conversion conditions in such a manner that the density of the image represented by the image data after density conversion processing changes by a predetermined amount (e.g., the density shifts toward a lower density by a predetermined amount), the proper image quality of the important part area of the image represented by the image data after image processing can be attained by the calculating means changing the density conversion conditions in accordance with the designation for change. In spite of this, however, the gradation in the background area of the image may fail to attain a proper level.
In contrast, in the third aspect of the invention, if information, which designates a change in the density conversion conditions in such a manner that the density of the image represented by the image data after density conversion process changes by a predetermined amount, is input through the input means, the image to be processed which is represented by the image data is analyzed again by changing the density thereof by a predetermined amount in accordance with the change designation, and the gradation compression conditions for hyper gradation processing are calculated based on the results of analysis. Thus, the processing conditions for the hyper gradation processing are calculated in such a manner as to not cause a loss in gradation detail in the background area. Therefore, even in cases in which a change in the density conversion conditions is designated in such a manner that the density after density conversion processing is changed by a predetermined amount, proper processing conditions of hyper gradation processing can be attained, and the image represented by the image-processed image data can be produced with proper quality.
A change in the density conversion conditions is often designated for the purpose of adjusting the density of the important part area (the area on which attention is focused) in the image to a desired level. If, in addition to the density conversion processing, gradation change processing (such as the hyper gradation processing in the third aspect of the invention) is performed for changing the gradation of the image for the image data in accordance with the gradation conversion conditions, the density of the image corresponding to the image data, which should inherently change uniformly by a predetermined amount corresponding to the density conversion conditions, fails to change by the same amount as the above-mentioned predetermined amount due to gradation conversion processing. At the same time, the density changes becomes uneven in various parts of the image (for example, the density changes at the important part area and the non-important part area in the image do not coincide). In this way, there is the possibility that the density of the important part area in the image may not be adjusted to the desired density level.
The density conversion conditions are often changed in such a manner that, while the image (simulation image) obtained by image processing according to the currently set processing conditions is displayed on the display unit or the like, the operator repeatedly presses a density correction key designating an increase or decrease in the image density by a predetermined amount and checks the change in image quality, e.g., the density, of the simulation image which change accompanies the input of the designation. However, in this case, when the gradation change processing is performed in addition to the density conversion processing, the density change amount (especially the density change amount in the important part area) of the image upon each pressing of the density correction key may fail to coincide with the density change amount in the absence of the gradation change processing, resulting in the operator having a feeling of sense of incongruity or extremely increased complexity of the designation operation for attaining the desired density of the important part area by operating the density correction key.
In view of the foregoing facts, according to a fourth aspect of the invention, the image processing apparatus of the first aspect further comprises means for detecting an essential part area of an image, wherein said image processing means performs plural types of image processings including density conversion processing for converting the density of the image represented by the image data in accordance with density conversion conditions, and gradation change processing for changing the gradation of the image in accordance with gradation change conditions, and wherein in a case in which information, which designates a change in the density conversion conditions in such a manner that the density of the image corresponding to the image data which has been subjected to the density conversion processing changes by a predetermined amount, is input to said calculating means through said input means, said calculating means changes the density conversion conditions for the density conversion processing and recalculates the gradation change conditions for the gradation change processing in such a manner that the density of the essential part area of the image corresponding to the image data which has been subjected at least to the density conversion processing and the gradation change processing changes by said predetermined amount.
In the fourth aspect of the invention, the important part area in the image is detected by the detection means. Also, when information, which designates a. change in the density conversion conditions in such a manner that the density of the image corresponding to the image data after density conversion processing changes by a predetermined amount, is inputted to the calculating means of the fourth aspect, the calculating means changes the density conversion conditions for the density conversion process and recalculates the gradation change conditions for the gradation change processing in such a manner that the density of the important part area in the image corresponding to the image data subjected to at least the density conversion processing and the gradation change processing changes by a predetermined amount.
Another example, in addition to hyper gradation processing, of gradation change processing for changing the image gradation in accordance with the gradation change conditions is face expression improvement processing for changing the gradation (density) of only the area corresponding to the human face in the image. Face expression improvement processing can attain the proper gradation of the human face.
In the fourth aspect of the invention, in an image based on image data which has been subjected to density conversion processing and gradation change processing, the amount of change in density of the image due to the carrying out of the density conversion processing is not uniform in the respective portions of the image, but the density of the important part area changes by a predetermined amount corresponding to the designation of the change in the density conversion conditions. It is therefore easy to designate a change in the density conversion conditions in such a manner as to adjust the density of the important part area in the image to a desired density. By repeatedly designating changes in the change of the density conversion conditions, for example, it is possible to prevent the operator from having a sense of incongruity or to prevent the operation of adjusting the important part area in the image to the desired density from becoming complicated.
The density of the important part area in the image may change both in the case of a change in the density conversion conditions of the density conversion processing and in the case of a change in the gradation change conditions of the gradation change processing. Also, the change in the density conversion conditions and the change in the gradation change conditions a affect each other. For this reason, the change in the density conversion conditions and the recalculation of the gradation change conditions by the calculating means according to the fourth aspect of the invention can be realized, as described in the fifth aspect, by changing the density conversion conditions in accordance with the designation for changing the density conversion conditions, reanalyzes the image to be processed by changing the density by a predetermined amount for the image data representing the image to be processed, and recalculates the gradation change conditions for the gradation change processing based on the results of analysis, and thereafter, said calculating means determines the density of the important part area of the image corresponding to the image data subjected to the density conversion processing and the gradation change processing, and , until the density change amount of the important part area substantially coincides with said predetermined amount, said calculating means repeats the processes of changing the density conversion conditions, analyzing the image to be processed, and recalculating the gradation change conditions, in order for the density change amount of the important part area to substantially coincide with the predetermined amount.
As described above, the processes of changing the density conversion conditions in such a manner that the density change amount for the important part area substantially coincides with a predetermined value, analyzing the image to be processed, and recalculating the gradation change conditions are repeated until the density change amount of the important part area substantially comes to coincide with the predetermined amount. In this way, the density conversion conditions and the gradation change conditions can be made to converge to the proper conditions (i.e., the conditions that the change amount of the density of the important part area of the image corresponding to the image data subjected to the density conversion processing and the gradation change processing can be made to coincide substantially with a predetermined amount, and that the image gradation can be changed to the proper gradation).
Also, the important part area detected by the detecting means, as specifically described in the sixth aspect of the invention, by analyzing the image and estimating the important part area in the image or by detecting the area designated through the input means as the important part area. In the case where the important part area is detected by analyzing the image and estimating the important part area in the image, the operator is not required to carry out the operation of designating the important part area in the image, and therefore, labor is saved. In the case where the area designated through the input means is detected as the important part area in the image, erroneous detection of the important part area can be prevented.
The detection means described above may either detect the important part area by estimating an important part area in the image or detect area designated as an important part area. Normally, however, it is preferable to detect the important part area by estimating an important part area. In the case where the area is designated through the input means, the area designation is given priority so that the designated area is detected as the important part area. As a result, the increase in the burden on the operator is minimized, while at the same time, the important part area in the image has a high probability of being detected correctly.
According to a seventh aspect of the invention, there is provided an image processing method comprising the steps of analyzing an image and, on the basis of the results of analysis, calculating the processing conditions for plural types of image processings for image data representing the analyzed image, carrying out the plural types of image processings on inputted image data in accordance with the calculated processing conditions, and upon receipt of information designating a change in the calculated processing conditions for a specific image processing, changing the processing conditions for said specific image processing, reanalyzing the image in such a manner as to reflect the designation to change the processing conditions, and on the basis of the results of analysis, recalculating the processing conditions for at least one image processing other than said specific image processing.